// 版权归陈超所有


#include "AbilitySystem/CC_AbilitySystemComponent.h"

void UCC_AbilitySystemComponent::AbilityActorInfoSet()
{
	//多播委托,绑定回调函数
	OnGameplayEffectAppliedDelegateToSelf.AddUObject(this, &UCC_AbilitySystemComponent::EffectApplied);
}

void UCC_AbilitySystemComponent::EffectApplied(UAbilitySystemComponent* AbilitySystemComponent, const FGameplayEffectSpec& EffectSpec, FActiveGameplayEffectHandle ActiveEffectHandle)
{
	FGameplayTagContainer TagContainer;
	EffectSpec.GetAllAssetTags(TagContainer);	//获取所有资产标签
	
	OnEffectAssetTags.Broadcast(TagContainer);		//广播一个多播委托
}
